mod information;

pub use information::{get_all_tables, get_data_size, get_tablet_by_name};
use mysql_async::prelude::FromRow;

#[derive(Debug, FromRow, Clone)]
pub struct Tables {
    // table_catalog: Option<String>,
    pub table_schema: String,
    pub table_name: String,
    // table_type: Option<String>,
    // engine: Option<String>,
    // version: Option<i64>,
    // row_format: Option<String>,
    // table_rows: Option<i64>,
    // avg_row_length: Option<i64>,
    // data_length: Option<i64>,
    // max_data_length: Option<i64>,
    // index_length: Option<i64>,
    // data_free: Option<i64>,
    // auto_increment: Option<i64>,
    // create_time: Option<DateTime<Utc>>,
    // update_time: Option<DateTime<Utc>>,
    // check_time: Option<DateTime<Utc>>,
    // table_collection: Option<String>,
    // checksum: Option<i64>,
    // create_options: Option<String>,
    // table_comment: Option<String>,
}

/* #[derive(Debug, Clone)]
pub struct Tablets {
    pub table_id: i32,
    pub replica_id: i32,
    pub backend_id: i32,
    pub schema_hash: String,
    pub version: String,
    pub version_hash: String,
    pub lst_success_version_hash: String,
    pub lst_failed_version: String,
    pub lst_failed_version_hash: String,
    pub lst_failed_time: Option<DateTime<Utc>>,
    pub data_size: String,
    pub row_count: i32,
    pub state: String,
    pub lst_consistency_check_time: DateTime<Utc>,
    pub check_version: String,
    pub check_version_hash: String,
    pub version_count: String,
    pub path_hash: String,
    pub meta_url: String,
    pub compaction_status: String,
} */

// #[derive(Debug, FromRow, Clone)]
// pub struct Partitions {
//     partition_id: u32,
//     partition_name: String,
//     visible_version: u8,
//     visible_version_time: String,
//     visible_version_hash: String,
//     state: String,
//     partition_key: String,
//     range: String,
//     distribution_key: String,
//     buckets: u8,
//     replication_num: u16,
//     storage_medium: String,
//     cool_down_time: String,
//     last_consistency_check_time: String,
//     data_size: String,
//     is_in_memory: String,
//     row_count: u32,
// }
